<?php $this->load->view('layout/header');?>
<div class="supplier-content-page">
    <div class="product-test-h5">
        <ul class="breadcrumb">
            <li><a href="javascript:;">消息</a></li>
            <li class="active"><a href="<?php echo site_url('mailbox/receiveBox')?>">站内信</a></li>
        </ul>
        <?php echo execute_alert_message();?>
        <div class="product-view-area">
            <p>站内信</p>
            <a href="<?php echo site_url('mailbox/add');?>">写信</a>
        </div>
        <div class="subject-table">
            <div class="account-record-nav clearfix">
                <a class="active" href="<?php echo site_url('mailbox/receiveBox')?>">已收信息</a>
                <a href="<?php echo site_url('mailbox/sendBox')?>">已发信息</a>
            </div>
            <?php if ($page_list->num_rows() > 0): ?>
                <table class="table table-bordered">
                    <thead>
                        <tr>
                            <th>发件人</th>
                            <th>主题</th>
                            <th>时间</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php foreach($page_list->result() as $item): ?>
                        <tr>
                            <td><?php echo $item->fname; ?></td>
                            <td><?php echo strlen($item->title)>30? utf8_substr($item->title,0,30)."...":$item->title; ?></td>
                            <td><?php echo $item->ftime; ?></td>
                            <td><a href="<?php echo site_url('mailbox/show/'.$flag.'/'.$item->id) ?>">查看全文</a></td>
                        </tr>
                        <?php endforeach;?>
                    </tbody>
                </table>
                <nav><?php echo $pg_link;?></nav>
            <?php else :?>
                <div class="none-data">暂无数据</div>
            <?php endif;?>
        </div>
    </div>
</div>
<?php $this->load->view('layout/footer');?>
